]> dgit.raspbian.org Git - ostree.git/log
ostree.git
5 months agoMerge pull request #3571 from jmarrero/fix-soft-reboot-var-mount
Colin Walters [Wed, 8 Apr 2026 17:38:30 +0000 (13:38 -0400)]
Merge pull request #3571 from jmarrero/fix-soft-reboot-var-mount

generator: Add DefaultDependencies=no to var.mount for soft-reboot

5 months agogenerator: Fix soft-reboot for var, sysroot, and boot
Joseph Marrero Corchado [Tue, 7 Apr 2026 19:24:45 +0000 (15:24 -0400)]
generator: Fix soft-reboot for var, sysroot, and boot

A bare `systemctl soft-reboot` on ostree/bootc systems was broken in
several ways because the generator and prepare-root were not accounting
for the fact that soft-reboot does not re-run the initramfs.

The var.mount unit had DefaultDependencies=yes, which pulled in implicit
After= dependencies on device units. After soft-reboot, these device
units get stuck in 'tentative' state while udev restarts, causing
var.mount to stall indefinitely. Fix this by setting
DefaultDependencies=no with explicit ordering After=local-fs-pre.target
sysroot.mount.

For /sysroot, systemd auto-generates the mount unit from mountinfo with
Conflicts=umount.target, causing it to be unmounted during soft-reboot
shutdown. Generate a drop-in with DefaultDependencies=no to prevent this.
We use a drop-in because the generator does not know the What= device
parameter — systemd gets that from mountinfo.

For /boot on same-partition setups, move the bind-mount from
ostree-prepare-root into the generator as a full boot.mount unit with
DefaultDependencies=no. This handles normal boot, bare soft-reboot, and
staged deployment soft-reboot uniformly. The static (non-systemd) path
in ostree-prepare-root-static.c retains its own bind-mount since the
generator does not run there.

Validated with plain disk and RAID1 kola tests on FCOS 43.

Fixes: https://issues.redhat.com/browse/RHEL-154075
Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
5 months agoMerge pull request #3570 from jmarrero/kargs-source
Colin Walters [Thu, 2 Apr 2026 19:32:14 +0000 (15:32 -0400)]
Merge pull request #3570 from jmarrero/kargs-source

bootconfig: Preserve extension BLS keys across staged deployments

5 months agoMerge pull request #3578 from henrywang/fix-debian-failure
Colin Walters [Thu, 2 Apr 2026 17:56:49 +0000 (13:56 -0400)]
Merge pull request #3578 from henrywang/fix-debian-failure

ci: Fix Debian Test failure

5 months agoci: Make fuse and libfuse-dev conditional for Debian Testing
Xiaofeng Wang [Thu, 2 Apr 2026 03:36:20 +0000 (11:36 +0800)]
ci: Make fuse and libfuse-dev conditional for Debian Testing

The libfuse-dev and fuse (FUSE 2) packages have been removed from
Debian Testing (forky/sid). Move them out of the unconditional package
list and only install them on older Debian/Ubuntu versions that still
provide FUSE 2. FUSE 3 support is already handled via the libfuse3-dev
argument logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Install ca-certificates in Debian Testing pre-checkout setup
Xiaofeng Wang [Thu, 2 Apr 2026 02:40:04 +0000 (10:40 +0800)]
ci: Install ca-certificates in Debian Testing pre-checkout setup

The debian:testing-slim image no longer includes ca-certificates by
default, causing the GitHub Actions checkout step to fail with an SSL
CA cert error when fetching the repository over HTTPS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agobootconfig: Preserve extension BLS keys across staged deployments
Joseph Marrero Corchado [Wed, 1 Apr 2026 19:40:45 +0000 (15:40 -0400)]
bootconfig: Preserve extension BLS keys across staged deployments

When a deployment is staged via ostree_sysroot_stage_tree_with_options(),
the deployment metadata is serialized to /run/ostree/staged-deployment
as a GVariant. During finalization at shutdown,
_ostree_sysroot_reload_staged() creates a fresh OstreeBootconfigParser
and only restores the "options" key from the serialized kargs. Any
additional BLS keys that were set on the bootconfig are silently dropped.

The parse/write/clone paths in OstreeBootconfigParser already handle
unknown keys generically (the "Write unknown fields" loop in
write_at()), so keys survive direct deployments and in-memory
operations. The gap is exclusively in the staged deployment roundtrip,
where a fresh bootconfig is rebuilt from just the kargs strv.

This matters for the upcoming bootc `loader-entries set-options-for-source`
feature, which stores kernel argument ownership as extension BLS keys
(e.g. `x-options-source-tuned nohz=full isolcpus=1-3`). On bootc
systems with transient /etc, tools like TuneD lose track of which kargs
they own because their state files are wiped on reboot. Tracking
ownership directly in the BLS config on /boot solves this, but only if
the keys survive staging. systemd-boot, GRUB, and zipl all ignore
unknown BLS keys, so extension keys are safe.

Fix this by following the same pattern used for overlay-initrds:

1. Add _ostree_bootconfig_parser_get_extra_keys_variant() which returns
   all non-standard BLS keys as an a{ss} GVariant. Standard keys
   (title, version, options, linux, initrd, devicetree) are excluded
   since they are rebuilt from scratch during finalization. All other
   keys are preserved, trusting the caller.

2. In ostree_sysroot_stage_tree_with_options(), serialize any extra
   keys as "bootconfig-extra" in the staged GVariant dict. Since
   _ostree_deployment_set_bootconfig_from_kargs() creates a fresh
   bootconfig with only the "options" key, the code falls back to
   the merge deployment's bootconfig for extra keys. This ensures
   keys are inherited across staged deployments without the caller
   needing to re-set them.

3. In _ostree_sysroot_reload_staged(), restore extra keys from the
   "bootconfig-extra" dict onto the deployment's bootconfig via
   ostree_bootconfig_parser_set().

The function is private (_ostree_ prefix) since only ostree's own
staging code uses it. No new public API, no changes to .sym files,
no changes to GIR or Rust bindings.

Backwards compatibility:
- Old ostree ignores the unknown "bootconfig-extra" key in the a{sv}
  dict (extension keys silently lost, same as before this patch).
- New ostree gracefully handles the absence of "bootconfig-extra" in
  staged data written by older versions (g_variant_dict_lookup returns
  FALSE, no restoration attempted).

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
5 months agoMerge pull request #3577 from henrywang/add-fmt
Colin Walters [Tue, 31 Mar 2026 19:49:35 +0000 (15:49 -0400)]
Merge pull request #3577 from henrywang/add-fmt

ci: Sync Rust linting checks from bootc-dev/bootc

5 months agoci: Use Justfile targets in GitHub workflow and add missing v2024_7 feature
Xiaofeng Wang [Tue, 31 Mar 2026 07:31:32 +0000 (15:31 +0800)]
ci: Use Justfile targets in GitHub workflow and add missing v2024_7 feature

- Replace inline cargo fmt/clippy commands in rust.yml with just
  cargo-fmt-check and just cargo-clippy for consistency with local dev
- Make Justfile cargo-clippy use CARGO_PROJECT_FEATURES env var
  (defaults to v2022_6) so CI and local use share the same config
- Add missing v2024_7 feature to Cargo.toml to fix cargo doc failure
  caused by unexpected cfg condition

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Add Rust validate targets to Justfile for local development
Xiaofeng Wang [Tue, 31 Mar 2026 07:15:30 +0000 (15:15 +0800)]
ci: Add Rust validate targets to Justfile for local development

Add just targets mirroring the CI Rust checks so developers can run
them locally before pushing:
- validate: runs both fmt and clippy checks
- cargo-fmt-check: checks formatting across all crates
- cargo-clippy: runs clippy with the same lint config as CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agotests/inst: Remove unused Kill9Stats and RebootStats structs
Xiaofeng Wang [Tue, 31 Mar 2026 07:12:05 +0000 (15:12 +0800)]
tests/inst: Remove unused Kill9Stats and RebootStats structs

These structs were never constructed, flagged by cargo clippy with
-Ddead_code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agotests/xtask: Fix cargo fmt formatting
Xiaofeng Wang [Tue, 31 Mar 2026 04:06:55 +0000 (12:06 +0800)]
tests/xtask: Fix cargo fmt formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Sync Rust linting checks from bootc-dev/bootc
Xiaofeng Wang [Tue, 31 Mar 2026 03:39:04 +0000 (11:39 +0800)]
ci: Sync Rust linting checks from bootc-dev/bootc

Align with bootc's validate target:
- Make cargo clippy gating (was "non-gating") with the same lint config
  as bootc (-A clippy::all -D clippy::correctness -D clippy::suspicious
  -Dunused_imports -Ddead_code)
- Extend clippy to cover test crates (tests/inst, tests/bootc-integration,
  tests/xtask)
- Add cargo doc with -D warnings to catch rustdoc issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Extend cargo fmt check to cover all Rust crates
Xiaofeng Wang [Tue, 31 Mar 2026 03:30:08 +0000 (11:30 +0800)]
ci: Extend cargo fmt check to cover all Rust crates

The existing cargo fmt check only covered the ostree workspace package.
Add fmt checks for the standalone test crates (tests/inst,
tests/bootc-integration, tests/xtask) which are separate workspaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoMerge pull request #3576 from henrywang/tmt-integration
Colin Walters [Mon, 30 Mar 2026 18:21:34 +0000 (14:21 -0400)]
Merge pull request #3576 from henrywang/tmt-integration

ci: Add Packit CI with RPM builds and TMT integration tests

5 months agoci: Fix cargo build failure on Fedora 43/44 in Containerfile.packit
Xiaofeng Wang [Mon, 30 Mar 2026 12:22:10 +0000 (20:22 +0800)]
ci: Fix cargo build failure on Fedora 43/44 in Containerfile.packit

Set CARGO_HOME=/var/tmp/.cargo to avoid conflict with /root/.cargo
which exists as a non-directory on Fedora 43/44 base images, causing
"failed to create directory: File exists (os error 17)".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Replace test-tmt shell script with Rust xtask
Xiaofeng Wang [Mon, 30 Mar 2026 08:29:10 +0000 (16:29 +0800)]
ci: Replace test-tmt shell script with Rust xtask

Replace the inline bash script in the Justfile test-tmt target with a
Rust xtask crate (tests/xtask/) that handles TMT plan discovery, bcvk
VM lifecycle, SSH readiness polling, and tmt invocation. This follows
the bootc-dev/bootc cargo xtask run-tmt pattern.

Also fix tests.fmf to pass test names individually with --exact, since
libtest_mimic only accepts a single filter argument.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agotests: Remove bcvk VM dispatch from Rust integration tests
Xiaofeng Wang [Mon, 23 Mar 2026 08:55:56 +0000 (16:55 +0800)]
tests: Remove bcvk VM dispatch from Rust integration tests

VM deployment is now handled externally by `just test-tmt` (bcvk + tmt)
or `just integration-container` (bcvk direct SSH). The Rust test binary
runs inside the VM as root, so the require_root/RunMode dispatch logic
is no longer needed.

- Remove require_root(), RunMode enum, and bcvk dispatch code
- Simplify booted_test! and privileged_test! macros to just register
  and run tests directly
- Remove rustix dependency (no longer checking getuid)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
5 months agoci: Add Packit CI with RPM builds and TMT integration tests
Xiaofeng Wang [Fri, 20 Mar 2026 08:50:58 +0000 (16:50 +0800)]
ci: Add Packit CI with RPM builds and TMT integration tests

Add Packit-based CI pipeline that builds RPMs via COPR and runs TMT
integration tests on bootc image-mode systems. This follows the
bootc-dev/bootc pattern of per-plan VM isolation using bcvk.

Key changes:
- Dockerfile: Add rpmbuild stage, use RPM overlay for rootfs, run
  provision-derived.sh for VM provisioning (cloud-init, rsync, etc.)
- Justfile: Add package target, test-tmt target with bcvk per-plan VMs,
  longer SSH wait for cloud-init first boot
- .github/workflows/bootc.yaml: Split into unit-tests and integration
  jobs, archive TMT logs with PR number in artifact name
- .packit.yaml: COPR builds + TMT tests for centos-stream-9/10 and
  fedora-43/44 on x86_64/aarch64
- tmt/: FMF test plans and shell-based tests (booted verification,
  privileged ostree tests) translated from Rust integration tests
- hack/: Packit provisioning scripts to convert package-mode VMs to
  image-mode via bootc install to-filesystem

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
6 months agoMerge pull request #3573 from cgwalters/test-revamp
Colin Walters [Thu, 19 Mar 2026 00:48:48 +0000 (20:48 -0400)]
Merge pull request #3573 from cgwalters/test-revamp

ci/tests: Revamp bootc integration test suite with bcvk VM support

6 months agoci: Revamp bootc integration test suite with bcvk VM support
Colin Walters [Tue, 17 Mar 2026 21:00:34 +0000 (21:00 +0000)]
ci: Revamp bootc integration test suite with bcvk VM support

 the old privtest CI job with a new tests/bootc-integration
Rust crate that runs inside a bcvk VM. The old tests/inst crate is
preserved for tests not yet ported.

Tests are split into two tiers based on what they need:

- booted_test!: needs a fully deployed ostree system. Dispatches via
  `bcvk libvirt run` which does `bootc install to-disk`.
- privileged_test!: just needs root. Dispatches via the faster
  `bcvk ephemeral run-ssh`.

The Justfile provides `integration-container` (full suite) and
`integration-ephemeral` (fast privileged-only path). JUnit XML output
is supported via the JUNIT_OUTPUT env var using quick-junit;
integration-container captures results to target/integration-results.xml.

Drop the vendored bootc-ubuntu-setup action in favor of the upstream
bootc-dev/actions/bootc-ubuntu-setup@main.

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoMerge pull request #3575 from igoropaniuk/fix/respect_tmpdir_in_tests
Colin Walters [Mon, 16 Mar 2026 15:36:23 +0000 (11:36 -0400)]
Merge pull request #3575 from igoropaniuk/fix/respect_tmpdir_in_tests

tests: Respect TEST_TMPDIR for temporary directories

6 months agotests: Respect TEST_TMPDIR for temporary directories
Igor Opaniuk [Mon, 9 Mar 2026 11:04:07 +0000 (12:04 +0100)]
tests: Respect TEST_TMPDIR for temporary directories

Several C tests hardcoded /var/tmp as the base path for temporary
working directories, ignoring the TEST_TMPDIR environment variable
used by the shell test suite.

This caused tests to create their ostree repos on the overlayfs
filesystem even when TEST_TMPDIR points to a real filesystem,
bypassing the intended workaround for overlayfs's inaccurate
free-space reporting. As a result, ostree's min-free-space-percent
check (default 3%) would fire when writing content objects, making
tests fail in containerized environments where the rootfs is overlayfs.

Fix by reading TEST_TMPDIR at runtime and falling back to /var/tmp
when it is not set, consistent with how the shell test suite handles
this. Affected tests:
- tests/test-libarchive-import.c
- tests/test-basic-c.c

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
6 months agoMerge pull request #3572 from pvalena/patch-1
Colin Walters [Fri, 6 Mar 2026 14:21:25 +0000 (09:21 -0500)]
Merge pull request #3572 from pvalena/patch-1

boot/dracut: use systemdsystemunitdir instead of systemdsystemconfdir

6 months agoboot/dracut: use systemdsystemunitdir instead of systemdsystemconfdir
Pavel Valena [Fri, 6 Mar 2026 12:09:32 +0000 (13:09 +0100)]
boot/dracut: use systemdsystemunitdir instead of systemdsystemconfdir

since dracut-109 [*], the systemdsystemconfdir exists only in hostonly mode, which leads to unbootable system; as documented here:
https://src.fedoraproject.org/rpms/dracut/pull-request/90

[*] https://github.com/dracut-ng/dracut-ng/commit/2991f74a

7 months agoMerge pull request #3569 from lxnay/main
Colin Walters [Mon, 9 Feb 2026 20:57:33 +0000 (15:57 -0500)]
Merge pull request #3569 from lxnay/main

status: Include deployment origin refspec as refspec in JSON output

7 months agostatus: Include deployment origin refspec as refspec in JSON output
Fabio Erculiani [Mon, 9 Feb 2026 14:31:47 +0000 (15:31 +0100)]
status: Include deployment origin refspec as refspec in JSON output

7 months agoMerge pull request #3559 from cgwalters/archive-utf8
Colin Walters [Fri, 30 Jan 2026 14:20:06 +0000 (09:20 -0500)]
Merge pull request #3559 from cgwalters/archive-utf8

libarchive: Handle UTF-8 filenames without locale dependency

7 months agolibarchive: Handle UTF-8 filenames without locale dependency
Colin Walters [Thu, 8 Jan 2026 21:24:14 +0000 (16:24 -0500)]
libarchive: Handle UTF-8 filenames without locale dependency

When importing archives (including OCI container layers), libarchive
attempts to convert filenames from UTF-8 to the current locale charset.
In POSIX/C locale (which uses ASCII), this conversion fails for any
non-ASCII UTF-8 characters, returning ARCHIVE_WARN.

This is triggered by Python 3.14 which creates a "𝜋thon" symlink in
venvs, and affects bootc installations in environments where LANG is
not set (defaulting to POSIX locale).

Fix this by:

1. Using archive_entry_pathname_utf8() and archive_entry_symlink_utf8()
   which return UTF-8 directly without locale conversion

2. Falling back to the regular accessors with explicit UTF-8 validation
   when the _utf8 variants return NULL

3. Accepting ARCHIVE_WARN from archive_read_next_header() since we now
   validate UTF-8 ourselves rather than relying on libarchive charset
   conversion

This matches the behavior of GNU tar which treats filenames as opaque
bytes without charset conversion.

Closes: https://github.com/ostreedev/ostree/issues/3431
7 months agoMerge pull request #3562 from dustymabe/dusty-uid-0
Dusty Mabe [Mon, 19 Jan 2026 20:57:52 +0000 (15:57 -0500)]
Merge pull request #3562 from dustymabe/dusty-uid-0

ci: drop running COSA as UID 0

7 months agoci: drop cosa fetch
Dusty Mabe [Fri, 16 Jan 2026 16:58:39 +0000 (11:58 -0500)]
ci: drop cosa fetch

Now that we are building via container tools `cosa fetch` isn't
meaningful any longer.

7 months agoci: drop running COSA as UID 0
Dusty Mabe [Fri, 16 Jan 2026 02:48:43 +0000 (21:48 -0500)]
ci: drop running COSA as UID 0

With some changes made upstream to COSA [1] and a few fixups here
to make sure the directory tree for our built software doesn't have
setgid files we shouldn't need to runAsUser: 0 any longer.

[1] https://github.com/coreos/coreos-assembler/pull/4410

8 months agoMerge pull request #3556 from jmarrero/ci-fix
Colin Walters [Tue, 6 Jan 2026 23:24:29 +0000 (00:24 +0100)]
Merge pull request #3556 from jmarrero/ci-fix

ci: Sync bootc-ubuntu-setup action from bootc-dev/infra

9 months agoMerge pull request #3555 from jmarrero/overlay-fix
Joseph Marrero Corchado [Wed, 17 Dec 2025 19:27:16 +0000 (14:27 -0500)]
Merge pull request #3555 from jmarrero/overlay-fix

state-overlay: Fix ENODATA handling for GLib < 2.74

9 months agoci: Sync bootc-ubuntu-setup action from bootc-dev/infra
Joseph Marrero Corchado [Wed, 17 Dec 2025 18:15:44 +0000 (13:15 -0500)]
ci: Sync bootc-ubuntu-setup action from bootc-dev/infra

The CI was failing because we were pulling podman/crun/skopeo
from Debian testing which has become unreliable. The bootc-dev/infra
repository maintains a reusable action that uses Ubuntu's plucky
repository instead, which is more appropriate for ubuntu-24.04 runners.

This also brings in additional improvements from the shared action:
- Disk space cleanup on the runner
- Unprivileged /dev/kvm access setup
- Optional libvirt stack support

Assisted-by: ClaudeCode (Claude Opus 4.5)
9 months agostate-overlay: Fix ENODATA handling for GLib < 2.74
Joseph Marrero Corchado [Tue, 16 Dec 2025 19:30:47 +0000 (14:30 -0500)]
state-overlay: Fix ENODATA handling for GLib < 2.74

The state overlay feature fails on first boot with:

  error: lgetxattr(user.ostree.deploymentcsum): No data available

This happens because `lgetxattrat_allow_noent()` checks for
`G_IO_ERROR_INVALID_DATA` to detect when an xattr doesn't exist.
However, GLib's `g_io_error_from_errno()` only maps `ENODATA` to
`G_IO_ERROR_INVALID_DATA` since GLib 2.74. Older versions (such as
GLib 2.68 shipped in CentOS Stream 9) return `G_IO_ERROR_FAILED`
instead, causing the check to fail and the error to propagate.

This creates a chicken-and-egg problem: the code tries to read the
`user.ostree.deploymentcsum` xattr before it can set it, but the read
fails on fresh overlay directories where the xattr hasn't been set yet.

Fix this by checking `errno == ENODATA` directly after the failed call,
which is portable across all GLib versions. Also rename the function
from `lgetxattrat_allow_noent` to `lgetxattrat_allow_nodata` to more
accurately reflect its purpose (ENODATA vs ENOENT).

This bug has existed since the state overlay feature was introduced in
v2024.1 but was masked on systems with GLib >= 2.74 (e.g., Fedora,
CentOS Stream 10) where the mapping happens to exist.

Assisted-by: Claude Code (Opus 4.5)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
10 months agoMerge pull request #3551 from jmarrero/release-20257
Colin Walters [Tue, 11 Nov 2025 22:46:06 +0000 (17:46 -0500)]
Merge pull request #3551 from jmarrero/release-20257

Release 2025.7

10 months agoconfigure: post-release version bump
Joseph Marrero Corchado [Mon, 10 Nov 2025 19:24:49 +0000 (14:24 -0500)]
configure: post-release version bump

10 months agoRelease 2025.7
Joseph Marrero Corchado [Mon, 10 Nov 2025 19:23:43 +0000 (14:23 -0500)]
Release 2025.7

10 months agootcore-prepare-root: Fix formatting with clang-format
Joseph Marrero Corchado [Mon, 10 Nov 2025 19:21:56 +0000 (14:21 -0500)]
otcore-prepare-root: Fix formatting with clang-format

10 months agoMerge pull request #3549 from cgwalters/fix-missing-colon
Colin Walters [Thu, 6 Nov 2025 21:02:02 +0000 (16:02 -0500)]
Merge pull request #3549 from cgwalters/fix-missing-colon

Add missing `:` to the gtk-doc in a few places

10 months agoAdd missing `:` to the gtk-doc in a few places
Colin Walters [Thu, 6 Nov 2025 19:35:04 +0000 (14:35 -0500)]
Add missing `:` to the gtk-doc in a few places

This is SUCH a giant trap. I am not totally sure why it's
working for me in a fedora-42 build env, but it seems like
it may have broken in a different build environment in
https://github.com/ostreedev/ostree/pull/3548#discussion_r2500278890

I used Sonnet to audit for similar instances beyond
`read_blob` and it found some, fix those too.

Signed-off-by: Colin Walters <walters@verbum.org>
10 months agoMerge pull request #3537 from alyssais/formatting
Colin Walters [Tue, 4 Nov 2025 18:10:57 +0000 (13:10 -0500)]
Merge pull request #3537 from alyssais/formatting

docs: fix formatting

10 months agoMerge pull request #3540 from miabbott/doc_adapting_existing_fix
Colin Walters [Fri, 24 Oct 2025 20:47:56 +0000 (16:47 -0400)]
Merge pull request #3540 from miabbott/doc_adapting_existing_fix

docs: fixed dead link

10 months agodocs: fixed dead link
Micah Abbott [Wed, 22 Oct 2025 20:22:56 +0000 (16:22 -0400)]
docs: fixed dead link

Fixes: #3534
Signed-off-by: Micah Abbott <miabbott@redhat.com>
10 months agoMerge pull request #3538 from alexlarsson/signature-crash-fix
Colin Walters [Mon, 20 Oct 2025 14:05:16 +0000 (10:05 -0400)]
Merge pull request #3538 from alexlarsson/signature-crash-fix

prepare-root: Fix crash if no valid signatures

10 months agoprepare-root: Fix crash if no valid signatures
Alexander Larsson [Mon, 20 Oct 2025 10:26:50 +0000 (12:26 +0200)]
prepare-root: Fix crash if no valid signatures

We didn't set error if there were zero valid signatures, which caused
a crash prefixing the error. While fixing this, the error messages were
slightly reworded to make it nicer.

10 months agodocs: fix formatting
Alyssa Ross [Sun, 19 Oct 2025 14:49:02 +0000 (16:49 +0200)]
docs: fix formatting

11 months agoMerge pull request #3532 from ckyrouac/softreboot-fix
Colin Walters [Wed, 15 Oct 2025 14:10:36 +0000 (10:10 -0400)]
Merge pull request #3532 from ckyrouac/softreboot-fix

deploy: Use delete_if_present in can_soft_reboot

11 months agodeploy: Use delete_if_present in can_soft_reboot
ckyrouac [Wed, 8 Oct 2025 19:52:28 +0000 (15:52 -0400)]
deploy: Use delete_if_present in can_soft_reboot

This avoids a dump when trying to delete the ostree= karg if it isn't
present. This is an issue with bootc factory reset.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
11 months agoMerge pull request #3533 from champtar/fix-ci-stream
Colin Walters [Mon, 13 Oct 2025 15:36:00 +0000 (11:36 -0400)]
Merge pull request #3533 from champtar/fix-ci-stream

ci,Justfile: fix building with the right stream

11 months agoci,Justfile: fix building with the right stream
Etienne Champetier [Fri, 10 Oct 2025 22:26:53 +0000 (18:26 -0400)]
ci,Justfile: fix building with the right stream

Part of the `e2e (stream10)` was running stream9.

As `just` doesn't support named parameters yet,
use `STREAM` env var to select between stream9 and stream10

11 months agoMerge pull request #3531 from champtar/fix-ci-libsoup
Colin Walters [Wed, 8 Oct 2025 12:08:15 +0000 (08:08 -0400)]
Merge pull request #3531 from champtar/fix-ci-libsoup

ci: use libsoup 3 by default

11 months agoci: use libsoup 3 by default
Etienne Champetier [Wed, 8 Oct 2025 02:06:47 +0000 (22:06 -0400)]
ci: use libsoup 3 by default

libsoup-3.0-dev is present in all supported debian versions
libsoup2.4-dev is not present in testing anymore (forkie)

11 months agoRemove no longer used .lgtm.yml
Etienne Champetier [Wed, 8 Oct 2025 01:52:33 +0000 (21:52 -0400)]
Remove no longer used .lgtm.yml

11 months agoMerge pull request #3529 from cgwalters/rust-release
Colin Walters [Mon, 29 Sep 2025 14:30:30 +0000 (10:30 -0400)]
Merge pull request #3529 from cgwalters/rust-release

Rust release

11 months agorust: Release 0.20.5
Colin Walters [Mon, 29 Sep 2025 12:43:03 +0000 (14:43 +0200)]
rust: Release 0.20.5

Signed-off-by: Colin Walters <walters@verbum.org>
11 months agorust: Fix Rust 1.89 lifetime lint
Colin Walters [Mon, 29 Sep 2025 12:21:53 +0000 (14:21 +0200)]
rust: Fix Rust 1.89 lifetime lint

11 months agoMerge pull request #3527 from alexlarsson/fix-sign-bindings
Colin Walters [Fri, 26 Sep 2025 15:10:23 +0000 (11:10 -0400)]
Merge pull request #3527 from alexlarsson/fix-sign-bindings

Fix various things around signatures and their use in rust

11 months agorust: Regenerate and release 0.20.5
Alexander Larsson [Fri, 26 Sep 2025 13:37:50 +0000 (15:37 +0200)]
rust: Regenerate and release 0.20.5

This adds the new bindings for signing and composefs use.

11 months agorust-binding: Extend bindings to support composefs and signing
Alexander Larsson [Fri, 26 Sep 2025 08:02:59 +0000 (10:02 +0200)]
rust-binding: Extend bindings to support composefs and signing

This adds GLib.VariantDict, which is needed for
ostree_repo_commit_add_composefs_metadata(), and OSTree.BlobReader
which are needed for ostree_sign_read_sk().

With these we can sign ostree commits with composefs digests in them.

11 months agogir: Add (nullable) to ostree_blob_reader_read_blob return value
Alexander Larsson [Fri, 26 Sep 2025 11:24:41 +0000 (13:24 +0200)]
gir: Add (nullable) to ostree_blob_reader_read_blob return value

This adds api docs to ostree_blob_reader_read_blob() so that we
can mark the return value as nullable. This is needed, because
this function can return NULL without setting error, and this
needs to be handled in bindings (such as the rust ones).

11 months agoostree-sign.ed25519/spki: Fix double free in set_sk()
Alexander Larsson [Fri, 26 Sep 2025 13:12:16 +0000 (15:12 +0200)]
ostree-sign.ed25519/spki: Fix double free in set_sk()

When the gvariant is G_VARIANT_TYPE_BYTESTRING we need to duplicate
the data we get from g_variant_get_fixed_array(), otherwise we will
double-free it when we later free sign->secret_key.

11 months agoMerge pull request #3526 from lcook/status-index-json
Colin Walters [Sat, 20 Sep 2025 17:46:10 +0000 (13:46 -0400)]
Merge pull request #3526 from lcook/status-index-json

status: Include deployment index in JSON output

11 months agostatus: Include deployment index in JSON output
Lewis Cook [Sat, 20 Sep 2025 08:55:49 +0000 (09:55 +0100)]
status: Include deployment index in JSON output

11 months agoMerge pull request #3523 from alexlarsson/signed-composefs-with-bootc
Colin Walters [Thu, 18 Sep 2025 18:38:54 +0000 (14:38 -0400)]
Merge pull request #3523 from alexlarsson/signed-composefs-with-bootc

Support using composefs signatures also with bootc commits

12 months agoSupport using composefs signatures also with bootc commits
Alexander Larsson [Mon, 15 Sep 2025 09:33:16 +0000 (11:33 +0200)]
Support using composefs signatures also with bootc commits

When using bootc, if you convert a signed ostree commit into an OCI
image `rpm-ostree compose container-encapsulate` you end up with a new
commit that isn't signed. However, the base commit object, and its
commitmeta are still in the image and will end up the repo, and
since https://github.com/bootc-dev/bootc/pull/1600 the base commit
id is available as the parent commit.

So, we change ostree-prepare-root to fall back to using the base
commit+commitmeta to find the expected composefs digest if the main
commit is not signed.

Note: This will only work with ostree-only commits. If you have any
layered data, then the content will change, and the composefs digest
in the base commit will not match the deployed one. This is expected
with such sealed commits though. If you want to layer, either disable
sealing, or create a new sealed ostree commit for the new image.

12 months agoprepare-root: add allow_noent argument to load_variant
Alexander Larsson [Mon, 15 Sep 2025 08:04:59 +0000 (10:04 +0200)]
prepare-root: add allow_noent argument to load_variant

This is a minor preparation for a later change. Instead of
hand-rolling the G_FILE_ERROR_NOENT error check we add
a new allow_noent option.

Additionally, we move the handling of a no commitmeta being
an error to the caller of load_commit_for_deploy(), because
this check will be slightly more complex in the future.

12 months agoMerge pull request #3524 from jlebon/pr/state-overlays-exp
Colin Walters [Thu, 11 Sep 2025 23:20:11 +0000 (19:20 -0400)]
Merge pull request #3524 from jlebon/pr/state-overlays-exp

man/ostree-state-overlay: drop experimental but link to bootc docs

12 months agoman/ostree-state-overlay: drop experimental but link to bootc docs
Jonathan Lebon [Thu, 11 Sep 2025 19:28:34 +0000 (15:28 -0400)]
man/ostree-state-overlay: drop experimental but link to bootc docs

This has baked for long enough now so drop the experimental flag. But do
explain that symlinks are preferred and link to the bootc docs.

12 months agoMerge pull request #3521 from cgwalters/release
Colin Walters [Fri, 5 Sep 2025 21:12:54 +0000 (17:12 -0400)]
Merge pull request #3521 from cgwalters/release

Release 2025.6

12 months agoconfigure: post-release version bump
Colin Walters [Fri, 5 Sep 2025 19:20:40 +0000 (15:20 -0400)]
configure: post-release version bump

12 months agoRelease 2025.6
Colin Walters [Fri, 5 Sep 2025 19:19:33 +0000 (15:19 -0400)]
Release 2025.6

12 months agoMerge pull request #3518 from champtar/remove-mount-cycle
Colin Walters [Fri, 5 Sep 2025 18:46:20 +0000 (14:46 -0400)]
Merge pull request #3518 from champtar/remove-mount-cycle

Rework mounts to fix sysroot.mount umount

12 months agoRevert "Add ostree-shutdown.service: hide /sysroot and make /etc read-only"
Etienne Champetier [Wed, 3 Sep 2025 18:22:39 +0000 (14:22 -0400)]
Revert "Add ostree-shutdown.service: hide /sysroot and make /etc read-only"

Instead of adding a shutdown service, we rework how we create the mounts.
After the 2 previous commits, sysroot.mount umount works, and
systemd-shutdown will take care of remounting etc.mount read-only and
calling sync() as needed.

This reverts commit d0c454c23637dceda6d7395dd2141b564e3efa47.

12 months agoostree-soft-reboot: fix sysroot.mount umount
Etienne Champetier [Wed, 3 Sep 2025 18:12:27 +0000 (14:12 -0400)]
ostree-soft-reboot: fix sysroot.mount umount

The composefs at /run/nextboot uses /sysroot, so systemd fails to
umount sysroot.mount during soft-reboot.
Create a temporary bind-mount, use it to prepare /run/nextboot
and MNT_DETACH it when we are done.

12 months agoostree-prepare-root: avoid mount cycle
Etienne Champetier [Tue, 2 Sep 2025 21:33:00 +0000 (17:33 -0400)]
ostree-prepare-root: avoid mount cycle

Moving the physical root at /sysroot, we end up
with a mount cycle between / and /sysroot, forcing us to use
MS_DETACH during shutdown (d0c454c23637dceda6d7395dd2141b564e3efa47).

We can replace ostree-shutdown.service by reworking how we mount
/sysroot, in short use MS_BIND instead of MS_MOVE.

12 months agoMerge pull request #3517 from jozzsi/3495
Colin Walters [Thu, 4 Sep 2025 12:13:57 +0000 (08:13 -0400)]
Merge pull request #3517 from jozzsi/3495

Move dracut module from 98 ordering to the recommended 50 ordering

12 months agoMove dracut module from 98 ordering to the recommended 50 ordering
Jo Zzsi [Sun, 31 Aug 2025 04:56:10 +0000 (00:56 -0400)]
Move dracut module from 98 ordering to the recommended 50 ordering

In dracut release v108 or later the recommended ordering for out
out of tree modules is 50. The following is a section from dracut
documentation:

> Not using the 50-59 range for out of tree dracut modules will likely
> lead to unintended errors in the initramfs generation process as your
> dracut module will either run too early or too late in the generation process.
> You have been warned.

Fixes: https://github.com/ostreedev/ostree/issues/3495
12 months agoMerge pull request #3516 from cgwalters/remount-shutdown
Etienne Champetier [Fri, 29 Aug 2025 22:27:38 +0000 (18:27 -0400)]
Merge pull request #3516 from cgwalters/remount-shutdown

Add ostree-shutdown.service: hide /sysroot and make /etc read-only

12 months agoAdd ostree-shutdown.service: hide /sysroot and make /etc read-only
Colin Walters [Thu, 28 Aug 2025 17:53:14 +0000 (13:53 -0400)]
Add ostree-shutdown.service: hide /sysroot and make /etc read-only

We have a lot of bind mounts; these are usually set up in the initramfs.
So far during shutdown we've let systemd just try to sort things out
via auto-generated mount units i.e. `sysroot.mount` and `etc.mount`
and so on.

systemd has some special casing for `-.mount` (i.e. `/`) and `etc.mount`
https://github.com/systemd/systemd/blob/e91bfad241799b449df73efc30d833b9c5937001/src/shared/fstab-util.c#L72

However it doesn't special case `/sysroot` - which is currently
an ostree-specific invention (when used in the real root).
We cannot actually unmount `/sysroot` while it's in use, and it
is because `/etc` is a bind mount into it. And we can't tear
down `/etc` because it's just expected that e.g. pid 1 and other
things hold open references to it - until things finally
transition into systemd-shutdown.

What we can do though is explicitly detach it during the shutdown
phase; this ensures that systemd won't try to clean it up then,
suppressing errors about its inability to do so.

While we're here, let's also remount `/etc` read-only; while
systemd itself will try to do so during systemd-shutdown.
Per comments if this service fails, it's a bug in something
else to be fixed.

Closes: https://github.com/ostreedev/ostree/issues/3513
Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoMerge pull request #3515 from HastD/xattrs-double-free
Colin Walters [Fri, 29 Aug 2025 20:07:17 +0000 (16:07 -0400)]
Merge pull request #3515 from HastD/xattrs-double-free

fix: double free in checkout_tree_at_recurse

12 months agofix: double free in checkout_tree_at_recurse
Daniel Hast [Fri, 29 Aug 2025 18:17:15 +0000 (14:17 -0400)]
fix: double free in checkout_tree_at_recurse

Both `xattrs` and `modified_xattrs` are declared with `g_autoptr`, but
`xattrs` is later simply assigned to be equal to `modified_xattrs`,
meaning the automatic cleanup is a double-free.

This is fixed by instead using `g_steal_pointer` to assign the old value
of `xattrs` to a temporary variable, which is used to create the new
value.

I believe this is the cause of issue #3303, and this should fix #3303.
(I can consistently reproduce the issue by attempting to deploy a
rechunked image with bootc, and with this patch, the issue no longer
occurs and the deployment succeeds.)

Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
12 months agoMerge pull request #3514 from cgwalters/finalize-needs-etc
Etienne Champetier [Wed, 27 Aug 2025 17:25:17 +0000 (13:25 -0400)]
Merge pull request #3514 from cgwalters/finalize-needs-etc

ostree-finalize-staged.service: RequiresMountsFor=/etc

12 months agoostree-finalize-staged.service: RequiresMountsFor=/etc
Colin Walters [Wed, 27 Aug 2025 14:38:11 +0000 (10:38 -0400)]
ostree-finalize-staged.service: RequiresMountsFor=/etc

I've seen in some cases systemd try to unmount /etc quite early
and then fail because it's in use.

It's confusing because I don't see this in all scenarios.
But regardless, in the situations where it does occur,
this fixes it.

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoMerge pull request #3512 from champtar/OSTREE_SUPPRESS_SYNCFS
Colin Walters [Tue, 26 Aug 2025 15:00:12 +0000 (11:00 -0400)]
Merge pull request #3512 from champtar/OSTREE_SUPPRESS_SYNCFS

libostree: remove OSTREE_SUPPRESS_SYNCFS

12 months agolibostree: remove OSTREE_SUPPRESS_SYNCFS
Etienne Champetier [Tue, 26 Aug 2025 13:10:21 +0000 (09:10 -0400)]
libostree: remove OSTREE_SUPPRESS_SYNCFS

This workaround was needed for the old valgrind version in EL 7

12 months agoMerge pull request #3509 from cgwalters/sysroot-sync-repo
Colin Walters [Mon, 25 Aug 2025 21:01:05 +0000 (17:01 -0400)]
Merge pull request #3509 from cgwalters/sysroot-sync-repo

Deduplicate repo+sysroot syncfs logic

12 months agoMerge pull request #3510 from cgwalters/release
Colin Walters [Mon, 25 Aug 2025 15:07:26 +0000 (11:07 -0400)]
Merge pull request #3510 from cgwalters/release

Release 2025.5

12 months agoDeduplicate repo+sysroot syncfs logic
Colin Walters [Thu, 21 Aug 2025 09:57:03 +0000 (11:57 +0200)]
Deduplicate repo+sysroot syncfs logic

This is a followup to https://github.com/ostreedev/ostree/pull/3504/commits/6e5a27a29d33d50a2a4380c406405435d919b6b4
which I believe is correct as is. However, we already have a file
descriptor open for the ostree repo, which *must* be on
the same filesystem as `/sysroot/ostree` (the deployment
code forces hardlinking today).

It's hence cleaner to reuse that extant fd instead of opening
a new one - we know we did writes to that fd.

But going farther here, there already is logic to use syncfs
for the repo when downloading objects (in a common case
we actually syncfs twice).

Since these are really the same operation, unify them:

- Add journaling to the repo one syncfs case
- Change the sysroot case to just call it
- Since we log consistently to the journal for all syncfs/fsfreeze
  operations now, drop the SyncStats bits which was a way
  to add info about that to a later journal message

Additionally, let's add an extra check when we're
opening the repo that it's on the same device just on general
principle.

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoconfigure: Post-release version bump
Colin Walters [Mon, 25 Aug 2025 12:49:34 +0000 (08:49 -0400)]
configure: Post-release version bump

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoRelease 2025.5
Colin Walters [Mon, 25 Aug 2025 12:46:57 +0000 (08:46 -0400)]
Release 2025.5

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoMerge pull request #3507 from cgwalters/aboot-chdir
Joseph Marrero Corchado [Thu, 21 Aug 2025 16:08:02 +0000 (12:08 -0400)]
Merge pull request #3507 from cgwalters/aboot-chdir

aboot: Use fd and not absolute path

12 months agoMerge pull request #3508 from cgwalters/switchroot-journal
Joseph Marrero Corchado [Thu, 21 Aug 2025 14:04:48 +0000 (10:04 -0400)]
Merge pull request #3508 from cgwalters/switchroot-journal

prepare-root: Log to journal, not stdout

12 months agoprepare-root: Log to journal, not stdout
Colin Walters [Wed, 20 Aug 2025 13:51:10 +0000 (15:51 +0200)]
prepare-root: Log to journal, not stdout

Since this can now be used as part of the shared library for
soft reboots, we shouldn't have a library write to stdout.
I noticed this in bootc. Use the journal instead.

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoaboot: Use fd and not absolute path
Colin Walters [Tue, 19 Aug 2025 13:16:35 +0000 (15:16 +0200)]
aboot: Use fd and not absolute path

Motivated by https://github.com/bootc-dev/bootc/pull/1532/commits/6d2eb2aaa92e23f434c47e3d0ebadc0307d45289

(We need to have a shared helper for this stuff at some point)

12 months agoMerge pull request #3506 from cgwalters/adapt-cosa
Colin Walters [Tue, 19 Aug 2025 13:10:24 +0000 (15:10 +0200)]
Merge pull request #3506 from cgwalters/adapt-cosa

ci: Adapt to cosa change

12 months agoci: Adapt to cosa change
Colin Walters [Tue, 19 Aug 2025 09:47:53 +0000 (11:47 +0200)]
ci: Adapt to cosa change

It seems to have stopped building qemu by default.

Signed-off-by: Colin Walters <walters@verbum.org>
12 months agoMerge pull request #3504 from champtar/syncfs-ostree
Colin Walters [Tue, 19 Aug 2025 07:10:29 +0000 (09:10 +0200)]
Merge pull request #3504 from champtar/syncfs-ostree

deploy: call syncfs() for /ostree instead of /

12 months agodeploy: call syncfs() for /ostree instead of /
Etienne Champetier [Mon, 18 Aug 2025 21:41:37 +0000 (17:41 -0400)]
deploy: call syncfs() for /ostree instead of /

In full_system_sync we were calling syncfs(/) expecting
all the recent modification in /ostree to be synced to disk.
With / now being composefs, syncfs(/) is a noop, so call
syncfs(/ostree) as that is what we really want.